class Solution:
    def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]:
        if k == 0 :
            return []
            
        # 计算要滑动多少次 6
        slide = len(nums) - k + 1

        result = []

        for i in range(slide):
            result.append(max(nums[i:i+k]))
        return result